using UnityEngine;
using System.Collections;

public class TimedParticle : MonoBehaviour {

    public ParticleEmitter emitter;
    public float Duration = 2.0f;
    public string m_PrefabId;
    float timer = 0.0f;
	void Awake () {
	}
	
	void Update () 
    {
        timer += Time.deltaTime;
        if (timer >= Duration)
        {
            PrefabManager.GetInstance().RecycleToPool(m_PrefabId,this.gameObject);
            timer = 0;
        }
	}
}
